package com.yuven.baselib.component.eventbus;

/**
 * 
 *
 * @author :        Yuven
 * @date :          2020/7/22 1:26 PM
 * @desc :
 */
public class Event<T> {

    private int code;
    private T data;

    public static Event create(int code){
        return new Event(code);
    }

    public static <T> Event create(int code, T data){
        return new Event(code,data);
    }

    private Event(int code) {
        this.code = code;
    }

    private Event(int code, T data) {
        this.code = code;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
